package br.com.alinesoftware.app.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

import com.powerlogic.jcompany.commons.PlcFileContent;
import com.powerlogic.jcompany.commons.config.stereotypes.SPlcEntity;
import com.powerlogic.jcompany.commons.file.PlcBaseMapFile;

@SPlcEntity
@Entity
@javax.persistence.Table(name = "ARQUIVO_IMAGEM")
@SequenceGenerator(name = "SE_ARQUIVO_PLC", sequenceName = "SE_ARQUIVO_PLC")
public class ArquivoImagem extends PlcBaseMapFile {

	private static final long serialVersionUID = 9073898147968871627L;

	@Override
	@OneToOne(targetEntity = Imagem.class, fetch = FetchType.LAZY)
	@Cascade({ CascadeType.ALL })
	public PlcFileContent getBinaryContent() {
		return (conteudo);
	}

}
